<%@ page language="java" pageEncoding="utf-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<ul class="classlist" id="newsList">
    <c:forEach items="${newsList}" var="news" varStatus="i">
        <li>${news.ntitle}
            <span> ${news.nauthor} ${news.nmodifyDate}
      <a href='../adminServlet/news?method=showNewsDetailsByNid&nid=${news.nid}'>修改</a>
      <a href='../adminServlet/news?method=deleteNews&nid=${news.nid}' onclick='return clickdel()'>删除</a>
    </span>
        </li>
        <c:if test="${i.count % 5 == 0}">
            <li class='space'></li>
        </c:if>
    </c:forEach>

    <span style="color: red;font-size: 16px;font-weight: bolder;">${deleteNews_msg}</span>

    <p align="center" style="font-size: 14px;">第${pageNo}页 共${totalPages}页</p>
    <c:if test="${pageNo != 1}">
        <a href="../adminServlet/news?method=getNewsByPage&pageNo=1&size=10&tid=${tid}">首页</a>
    </c:if>
    <c:if test="${pageNo != 1}">
        <a href="../adminServlet/news?method=getNewsByPage&pageNo=${pageNo-1}&size=10&tid=${tid}">上一页</a>
    </c:if>
    <c:set var="totalPagesValue" value="${totalPages}"/>
    <c:if test="${pageNo != totalPagesValue}">
        <a href="../adminServlet/news?method=getNewsByPage&pageNo=${pageNo+1}&size=10&tid=${tid}">下一页</a>
    </c:if>
    <c:if test="${pageNo != totalPagesValue}">
        <a href="../adminServlet/news?method=getNewsByPage&pageNo=${totalPages}&size=10&tid=${tid}">末页</a>
    </c:if>
</ul>